// 兼容 IE
// https://github.com/zloirock/core-js/blob/master/docs/2019-03-19-core-js-3-babel-and-a-look-into-the-future.md#babelpolyfill
import 'core-js/stable'
import 'regenerator-runtime/runtime'

import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'

// 设置 js中可以访问 $cdn
import { $cdn } from '@/config'
import { getDicts } from './api/api'

Vue.prototype.$cdn = $cdn

// 全局引入按需引入UI库 vant
import '@/plugins/vant'
// 引入全局样式
import '@/assets/css/index.scss'
// 移动端适配
import 'lib-flexible/flexible.js'

import BaiduMap from 'vue-baidu-map'

import AMap from 'vue-amap'
Vue.use(AMap)

// 初始化vue-amap
AMap.initAMapApiLoader({
  // 高德key
  key: 'd17b3fa68766d61fceee00ce9337e9d4',
  // 插件集合 （插件按需引入）
  plugin: ['AMap.Geolocation', 'AMap.Autocomplete', 'AMap.PlaceSearch', 'AMap.Scale', 'AMap.OverView', 'AMap.ToolBar', 'AMap.MapType', 'AMap.PolyEditor', 'AMap.CircleEditor', 'AMap.CitySearch']
})

// main.js
// 全局引入
import echarts from 'echarts'
import 'echarts-liquidfill'

import wx from 'weixin-js-sdk'

Vue.prototype.$wx = wx

Vue.prototype.$echarts = echarts

// filters
import './filters'
Vue.config.productionTip = false

Vue.prototype.getDicts = getDicts

Vue.use(BaiduMap, {
  ak: 'tTU9H1Fx3ukDXnCLstoVmFChxuzjz7wq' //  在此输入你自己的百度地图ak
})

new Vue({
  el: '#app',
  router,
  store,
  render: h => h(App)
})
